﻿using Abp.AutoMapper;
using AbpProjectTemplate.Domain.Categories;
using System.ComponentModel.DataAnnotations;

namespace AbpProjectTemplate.Application.Categories.Dtos
{
    [AutoMapTo(typeof(Category))]
    public class CategoryCreateDto
    {
        /// <summary>
        /// 类型
        /// </summary>
        public CategoryType Type { get; set; }
        /// <summary>
        /// 父级ID，为null表示顶级
        /// </summary>
        public long? ParentId { get; set; }
        /// <summary>
        /// 名称 
        /// </summary>
        [Required]
        [StringLength(Category.MaxDisplayNameLength)]
        public string DisplayName { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }
    }
}
